/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.dashboard.shared.serversup;

import java.io.Serializable;

/**
 *
 * @author g36267
 */
public class ServerInfo implements Serializable {

    private String serverURL;
    private String serverName;
    private boolean alive;

    public ServerInfo() {
    }
    
    public ServerInfo(String serverName, String serverURL) {
        this.serverURL = serverURL;
        this.serverName = serverName;
    }

    public boolean isAlive() {
        return alive;
    }

    public String getName() {
        return serverName;
    }

    public void setAlive(boolean alive) {
        this.alive = alive;
    }

    public String getServerURL() {
        return serverURL;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ServerInfo that = (ServerInfo) o;

        return !(serverURL != null ? !serverURL.equals(that.serverURL) : that.serverURL != null);
    }

    @Override
    public int hashCode() {
        return serverURL != null ? serverURL.hashCode() : 0;
    }
}
